<template>
	<a v-bind:class="[disable?'stepButton-a-disable':'','stepButton-a']" v-on:click="buttonEvent">{{title}}</a>
</template>
<style scoped>
	.stepButton-a {
		background-color: #409EFF;
		color: #ffffff;
		width: 90px;
    height: 42px;
    display: inline-block;
		line-height: 42px;
		border: 1px solid #409EFF;
		text-align: center;
		cursor: pointer;
		margin: 5px;
		border-radius: 4px;
		font-size: 16px;
	}

	.stepButton-a-disable {
		cursor: not-allowed;
		background-color: #e6e6e6;
		border: 1px solid #e6e6e6;
	}
</style>
<script>
	//表格内操作按钮
	export default {
		name: "stepButton",
		props: {
			disable: {
				default: false
			},
			title: {
				default: ""
			}
		},
		meta: {
			descr: "步骤按钮"
		},
		methods: {
			buttonEvent: function() {
				let that = this;
				if (!that.disable) {
					that.$emit("click");
				}
			}
		}
	};
</script>